const formCom = require('./zy-form-com')

module.exports = Behavior({
    behaviors: [formCom],
    properties: {
        type: String,
        password: {
            type: Boolean,
            value: false
        },
        placeholder: String,
        placeholderStyle: String,
        disabled:  {
            type: Boolean,
            value: false
        },
        maxlength: {
            type: Number,
            value: -1
        },
        confirmType: String
    },
    data: {
        value: null,
    },
    methods: {
        setVal(newVal) {
            this.setData({
                value: newVal
            })
        },
        onChange(e) {
            this.triggerEvent('change', e.detail)
        }
    }
})